import { type Pinia, createPinia } from 'pinia';
import { createPersistedState } from 'pinia-plugin-persistedstate';

// 创建
const pinia: Pinia = createPinia();
pinia.use(createPersistedState({
    auto:true,
    serializer: { // 指定参数序列化器
        serialize: JSON.stringify,
        deserialize: JSON.parse,
    },
    debug: true
}));

// 导出
export { pinia };

export * from './token/index';
export * from './user/index';